﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SH.Multitenant.Core.Saas;
using SH.Multitenant.Domain.Multitenant;
using SH.Multitenant.Domain.RBAC;
using SqlSugar;

namespace SH.Multitenant.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MigrationController : ControllerBase
    {
        private readonly ISqlSugarClient _context;

        public MigrationController()
        {
            _context = DbManger.MasterDb;
        }
        [HttpGet]
        public IActionResult GetUsers()
        {
            var result = _context.AsTenant().QueryableWithAttr<Employee>().ToList();
            return Ok(result);
        }
    }
}
